import request from '@/utils/request'

// 获取组织架构的数据
export const getDepartments = () => request.get('/company/department')

//  删除组织结构的部门
export const delDepartments = id => request.delete(`/company/department/${id}`)

// 新增组织结构部门
export const addDepartments = date => request.post('/company/department',date)

// 获取组织架构的部门的详情
export const getDepartDatail = id => request.get(`/company/department/${id}`)

// 修改组织架构的部门详情
export const updateDepart = data => request.put(`/company/department/${data.id}`,data)